#!/bin/bash
#

read -p "输入三角形的行数：" sn
read -p "输入梯形1的行数(建议大于3)：" tn
read -p "输入梯形2的行数(建议大于3)：" ttn
read -p "输入矩形的行数：" jn
read -p "输入矩形的列数：" m
#正三角
for ((si=1; si<=sn; si++)); do
    for ((sj=1; sj<=sn-si; sj++));do
	echo -n "  "
    done
    for ((sk=1; sk<=2*si-1; sk++));do
	echo -n "* "
    done
    echo
done

#梯形
for ((ti=3; ti<=tn; ti++)); do
    for ((tj=1; tj<=tn-ti; tj++));do
	echo -n "  "
    done
    for ((tk=1; tk<=2*ti-1; tk++));do
	echo -n "* "
    done
    echo
done

#梯形2
for ((tti=3; tti<=ttn; tti++)); do
    for ((ttj=1; ttj<=ttn-tti; ttj++));do
        echo -n "  "
    done
    for ((ttk=1; ttk<=2*tti-1; ttk++));do
        echo -n "* "
    done
    echo
done


#矩形
for((ji=1;ji<=jn;ji++));do
    for((jj=1;jj<=m;jj++));do
	echo -n "* "
    done
    echo
done
